<ui:composition template="/template/template-professor.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets">

    <ui:define name="corpo">
        <h:form>
            <div style="margin-left: 30%; width: 500p !important;">
                <p:panel style="margin-bottom:10px; display: table-cell; vertical-align: middle; font-size: 12px !important;">
                    <p:messages autoUpdate="true" id="mensagem" showDetail="true" />
                    <h:panelGrid columns="2" cellpadding="5" id="DadosCadastrais">

                        <h:outputText value="E-Mail: "/>
                        <p:inputText id="EMail" value="#{cadastraAlunoManagedBean.email}" required="true"/>

                        <h:outputText value="Senha: "/>
                        <p:password id="Password" value="#{cadastraAlunoManagedBean.senha}" feedback="true" required="true"
                                    promptLabel="Digite sua Senha" weakLabel="Fraca" goodLabel="Média" strongLabel="Forte"
                                    match="Password2"/>

                        <h:outputText value="Senha Novamente: "/>
                        <p:password id="Password2" value="#{cadastraAlunoManagedBean.senha2}" feedback="true" required="true"
                                    promptLabel="Digite sua Senha" weakLabel="Fraca" goodLabel="Média" strongLabel="Forte"/>


                        <h:outputText value="Nome: "/>
                        <p:inputText id="Nome" value="#{cadastraAlunoManagedBean.nome}" required="true"/>

                        <h:outputText value="Sobrenome: "/>
                        <p:inputText id="Sobrenome" value="#{cadastraAlunoManagedBean.sobrenome}" required="true"/>


                    </h:panelGrid>
                    <p:separator />

                    <p:commandButton value="Cadastrar" id="Cadastrar" update="DadosCadastrais" action="#{cadastraAlunoManagedBean.cadastrar}" />

                </p:panel>
            </div>
        </h:form>       
    </ui:define>
</ui:composition>